1. Field of the Technology
The technology presented herein relates to a game device and a storage medium having a game program stored therein, and more particularly, for example, to a game device and a storage medium having a game program stored therein for indicating a behavior of an object landing on a ground in a virtual game space.
2. Description of the Background Art
In a conventional video game, there are cases where a state of an object falling in a virtual three-dimensional space, and landing on a ground is displayed. For example, a state of an object such as a dice which is thrown, falls on the ground, and bounces and rolls on the ground, and then come to rest on the ground is displayed. As a concrete method for describing such state, a first and second method as shown below may be considered.
A first method is a method based on an actual physical behavior. That is, when a part of a falling object contacts a ground, a rebound force is calculated based on a contact position and a speed of the object. In addition, a subsequent behavior of each vertex of the object is calculated based on the rebound force. Based on such behavior, a behavior of the object bouncing and rolling after contacting the ground is displayed. When a part of the object contacts the ground for the next time, a rebound force is calculated, and a behavior of each vertex of the object is calculated in the same manner as described above. Thereafter, by repeating the above calculation until the object stops, a behavior of the object until the object comes to rest on the ground is calculated. According to the first method, a behavior of an object can be displayed realistically.
A second method is a method for determining a face closest to the ground as a landing face. According to this method, when an object contacts the ground, a face closest to the ground (e.g., a face having a smallest angle with the ground) is calculated and the face is determined as the landing face of the object. FIG. 14 is a diagram illustrating a state of a falling object contacting the ground. FIG. 14 is a sideways view of the ground. In FIG. 14, since face ABCD of an object 91 is determined to be a face closest to the ground (i.e., an angle to the ground is smallest), the face ABCD is determined as the landing face. Therefore, as shown in FIG. 15, the object is stopped in a position with the face ABCD contacting the ground. The second method allows to calculate a final landing face of an object with a small processing amount, and to display a behavior of the object by a relatively easy process.
Methods of calculating, when an impact is applied to an object in a virtual space, a subsequent behavior of the object is described in patent document 1 (Japanese Laid-open Patent Publication No. 2001-43397) and patent document 2 (Japanese Laid-open Patent Publication No. 11-216269) for example. In the method described in patent document 1, when an impact is applied to an object having a predetermined rotation axis, a position of the object where the impact is applied to, and an impact vector are calculated. Then a rotating operation of the object is performed based on the impact vector and a distance between the position and the rotation axis or a rotation center of the object. Thereby, a realistic display of a rotating operation of an object is provided. In addition, a method described in patent document 2 is a method for performing a weapon repelling action when a weapon of a player character and a weapon of an enemy character collide. According to this method, when the weapon of the player character and the weapon of the enemy character collide, a direction of movement of each weapon after the collision is calculated based on factors such as a direction of movement of each weapon before the collision.
According to the first method, even though a realistic display of a landing state of an object can be provided, there is a problem that an enormous amount of calculation is required. Considering that there are game devices with low processing performance, it is difficult to employ the first method for a game process.
On the other hand, according to the second method, a face that is located closest to the ground at a time when the object contacts the ground is determined to be a landing face of the object when the object is stopped. In examples shown in FIGS. 14 and 15 a landing face of the object 91 is determined to be face ABCD which is closest to the ground. As mentioned above, according to the second method, the object lands on any one of the faces, and landing easiness of each face is equal. When displaying a state of an object landing on a ground, depending on the contents of the game, it may be preferable that a landing direction of an object and landing easiness in the direction are freely assigned. For example, when displaying a state of an object landing in a natural manner, taking the examples of FIGS. 14 and 15, it is natural and preferable that a face BCGF becomes the landing face. However, according to the second method, a landing face of an object is uniquely determined based on an angle to a ground at a time when the object contacts the ground. Thus, it is not allowed to freely assign a landing easiness of each face. In addition, depending on the contents of the game, there may be cases where it is preferable for the object 91 to land with the vertex pointing downwards (i.e., in a direction with the vertex sticking in the ground). However, according to the second method, since possible landing directions of the object are determined by a shape of the object 91, it is not possible to land the object with the vertex pointing downwards. Furthermore, according to the second method, it is not possible to determine a landing direction of an object which has a curved surface. Consequently, according to the second method, since possible landing directions of an object and landing easiness in each direction are uniquely determined by the shape of the object, there may be cases when an intention of a game creator cannot be reflected.
Note that patent document 1 provides a calculation method for an object having a predetermined rotation axis. For an object without a rotation axis, such as an object falling on a ground, the method described in patent document 1 is not applicable. Patent document 2 provides a method of calculating, when two objects collides, a direction in which each object moves after the collision. A precondition for this method is that each of the collided objects moves after the collision, thus a case where the two objects stop in a collided position is not considered. Furthermore, in a case when the objects are stopped in a collided position, a position of each object (in which direction the object is stopped in) is not considered. Therefore, even if one object is considered as a ground, and the other object is considered as a falling object, the method provided in the patent document 2 is not applicable to a process of displaying a landing behavior of a falling object.